package com.cmcc.example.face.noSdk.common.vo.request;

import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
import sun.misc.BASE64Encoder;

import java.io.IOException;
import java.io.Serializable;

/**
 * <p>
 * <name>FaceDetectVO</name>
 * 人脸识别请求对象
 * </p >
 *
 * @author arabira
 * @version 1.0 2020-04-07
 * @since 1.0
 */
@Data
public class FaceDetectVO implements Serializable {
    private static final long serialVersionUID = 4433464552975858605L;
    private String imageFile;

    public FaceDetectVO() {
    }

    public FaceDetectVO(MultipartFile image) throws IOException {
        this.imageFile = new BASE64Encoder().encode(image.getBytes());
    }

}